# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=neochat
pkgver=24.02.2
pkgrel=0
pkgdesc="A client for Matrix, the decentralized communication protocol"
url="https://invent.kde.org/network/neochat/"
# armhf blocked by extra-cmake-modules
# riscv64 blocked due to build failure on builders, compiler segfault
# Wait for real riscv64 hardware before enabling again
# s390x and ppc64le blocked by qt6-qtwebview
arch="all !armhf !riscv64 !s390x !ppc64le"
license="GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND BSD-2-Clause"
depends="
	kirigami
	kirigami-addons
	kitemmodels
	kquickcharts
	kquickimageeditor
	prison
	qqc2-desktop-style
	qt6-qtlocation
	"
makedepends="
	cmark-dev
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kirigami-dev
	kitemmodels-dev
	knotifications-dev
	kquickimageeditor-dev
	kstatusnotifieritem-dev
	libquotient-dev
	qcoro-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qt6-qtwebview-dev
	qtkeychain-dev
	samurai
	sonnet-dev
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/network/neochat.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/neochat-$pkgver.tar.xz"
# No tests
options="!check"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
726ae34b6e714f34d4f88070ef3e173cfb2893530e65efdaf294b835ab9c1e1f8c600c6accf6124bd7f509079acacf2e9b36f3b43956ba37b531677f25a4f18c  neochat-24.02.2.tar.xz
"
